import React, { Component } from 'react'
import style from "./main.module.css"
const typeObj={
    "D3":"中文3D",
    "D3max":"中文3Dmax",
    "NEW":'新',  
}
const type={
  "forSale" :"取消",
  "purchase":'购买'
}

export class Main extends Component {
    
   
  render() {
      const {tablist}=this.props
    return (
      <div className='main'>
          <ul>
              { tablist.length ?  tablist.map((item,index)=>{
                  return <li key={item.id}> 
                 <img src={item.img} /> 
                 <p className={style[item.type]}>{type[item.type]}</p>
                 <p className={style[item.tag]}> {typeObj[item.tag] }</p>
                 <p> {item.name}</p> 
                 <p> {item.title}</p>   
                 <p>{item.num}分 </p> 
                  </li>
              }) :'无数据' }
          
          </ul>

      </div>
    )
  }
}

export default Main